home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 07 - 1991 / 07.11 Nov 91 / TPose Source / UCharacterDialog.r < prev    next >
Encoding:
Text File  |  1991-05-23  |  8.0 KB  |  181 lines  |  [TEXT/MPS ]

  1. #include "Types.r"
  2. #include "MacAppTypes.r"
  3. #include "ViewTypes.r"
  4.  
  5. /* Command number */
  6. #define cCharacter            1503    /* see DemoText.r */
  7.  
  8. // see IM v1 p387
  9. #define teJustLeft            0
  10. #define teJustCenter        1
  11. #define teJustRight           -1
  12.  
  13. // see IM v1 p210 (p152 is WRONG)
  14. #define    boldBit                0
  15. #define italicBit            1
  16. #define underlineBit        2
  17. #define outlineBit             3
  18. #define shadowBit            4
  19. #define condenseBit             5
  20. #define extendBit            6
  21.  
  22. #define kEmptySet           -1
  23. #define kNormalSpacing        0
  24.  
  25. // strings for sample text
  26. #define kSampleTextString    32700    // why not?  it's a good number!
  27.  
  28. /*********************************************************************************
  29.     The following resources define the application's Character dialog.
  30. *********************************************************************************/
  31.  
  32. resource 'view' (cCharacter, "cCharacter", purgeable) {
  33.     {
  34.     root, 'wind', {50, 40}, {230, 465}, sizeVariable, sizeVariable, shown, enabled, 
  35.     Window {"TWindow", dBoxProc, noGoAwayBox, notResizable, modal, ignoreFirstClick, 
  36.         dontFreeOnClosing, disposeOnFree, doesntCloseDocument, dontOpenWithDocument, 
  37.         dontAdaptToScreen, dontStagger, dontForceOnScreen, center, 'size', "<<<>>>"}, 
  38.  
  39.     'wind', 'DLOG', {0, 0}, {230, 465}, sizeVariable, sizeVariable, shown, enabled, 
  40.     DialogView {"TCharDialogView", 'ok  ', 'cncl'}, 
  41.  
  42.     'DLOG', 'sclu', {3, 155}, {132, 53}, sizeFixed, sizeFixed, shown, disabled, 
  43.     Cluster {"TSizeCluster", noAdornment, sizeable, notDimmed, notHilited, 
  44.         doesntDismiss, noInset, systemFont, ""}, 
  45.  
  46.     'sclu', 'size', {107, 5}, {20, 35}, sizeFixed, sizeFixed, shown, enabled, 
  47.     NumberText {"TSizeText", adnFrame, {1, 1}, sizeable, notDimmed, notHilited, 
  48.         doesntDismiss, {3, 3, 3, 3}, systemFont, justSystem, "12", 3,
  49.         arrowsAndBackspace, 12, 1, 127}, 
  50.  
  51.     'sclu', 'VW28', {17, 5}, {80, 45}, sizeVariable, sizeVariable, shown, disabled, 
  52.     Control {"TControl", adnFrame, {1, 1}, sizeable, notDimmed, notHilited, 
  53.         doesntDismiss, noInset, systemFont}, 
  54.  
  55.     'VW28', 'VW30', {1, 1}, {78, 28}, sizeRelSuperView, sizeRelSuperView, shown, disabled, 
  56.     Scroller {"TScroller", VertScrollBar, noHorzScrollBar, 256, 256, 16, 16, noVertConstrain, 
  57.         noHorzConstrain, noInset}, 
  58.  
  59.     'VW30', 'slst', {0, 0}, {0, 28}, sizeVariable, sizeFixed, shown, enabled, 
  60.     TextListView {"TSizeListView", 0, 1, 0, 28, 0, 2, dontAdornRows, dontAdornCols, 
  61.         singleSelection, systemFont}, 
  62.  
  63.     'DLOG', 'just', {5, 325}, {65, 130}, sizeFixed, sizeFixed, shown, disabled, 
  64.     Cluster {"TJustifyCluster", noAdornment, sizeable, notDimmed, notHilited, 
  65.         doesntDismiss, noInset, systemFont, "Justify:"}, 
  66.  
  67.     'just', 'Left', {15, 15}, {15, 50}, sizeFixed, sizeFixed, shown, enabled, 
  68.     ValueRadio {"TValueRadio", noAdornment, sizeable, notDimmed, notHilited, 
  69.         doesntDismiss, noInset, systemFont, on, "Left", teJustLeft}, 
  70.  
  71.     'just', 'Cntr', {30, 15}, {15, 65}, sizeFixed, sizeFixed, shown, enabled, 
  72.     ValueRadio {"TValueRadio", noAdornment, sizeable, notDimmed, notHilited, 
  73.         doesntDismiss, noInset, systemFont, off, "Center", teJustCenter}, 
  74.  
  75.     'just', 'Rght', {45, 15}, {15, 55}, sizeFixed, sizeFixed, shown, enabled, 
  76.     ValueRadio {"TValueRadio", noAdornment, sizeable, notDimmed, notHilited, 
  77.         doesntDismiss, noInset, systemFont, off, "Right", teJustRight}, 
  78.  
  79.     'DLOG', 'VW09', {145, 10}, {15, 55}, sizeFixed, sizeFixed, shown, disabled, 
  80.     StaticText {"TStaticText", noAdornment, sizeable, notDimmed, notHilited, 
  81.         doesntDismiss, noInset, systemFont, justSystem, "Sample:"}, 
  82.  
  83.     'DLOG', 'VW22', {140, 10}, {1, 445}, sizeVariable, sizeVariable, shown, disabled, 
  84.     Control {"TControl", 0b1, {1, 1}, sizeable, dimmed, notHilited, 
  85.         doesntDismiss, noInset, systemFont}, 
  86.  
  87.     'DLOG', 'VW23', {200, 295}, {22, 72}, sizeFixed, sizeFixed, shown, enabled, 
  88.     Button {"TButton", noAdornment, sizeable, notDimmed, notHilited, 
  89.         dismisses, noInset, systemFont, "Cancel"}, 
  90.  
  91.     'DLOG', 'VW24', {195, 375}, {30, 80}, sizeFixed, sizeFixed, shown, enabled, 
  92.     Button {"TButton", adnRRect, {3, 3}, sizeable, notDimmed, notHilited, 
  93.         dismisses, {4, 4, 4, 4}, systemFont, "OK"}, 
  94.  
  95.     'DLOG', 'VW25', {20, 10}, {114, 140}, sizeVariable, sizeVariable, shown, disabled, 
  96.     Control {"TControl", adnFrame, {1, 1}, sizeable, notDimmed, notHilited, 
  97.         doesntDismiss, noInset, systemFont}, 
  98.  
  99.     'VW25', 'VW27', {1, 1}, {112, 123}, sizeRelSuperView, sizeRelSuperView, shown, disabled, 
  100.     Scroller {"TScroller", VertScrollBar, HorzScrollBar, 256, 256, 16, 16, noVertConstrain, 
  101.         noHorzConstrain, noInset}, 
  102.  
  103.     'VW27', 'flst', {0, 0}, {0, 123}, sizeVariable, sizeFixed, shown, enabled, 
  104.     TextListView {"TFontListView", 0, 1, 0, 123, 0, 2, dontAdornRows, dontAdornCols, 
  105.         singleSelection, systemFont}, 
  106.  
  107.     'DLOG', 'VW26', {5, 10}, {15, 30}, sizeFixed, sizeFixed, shown, disabled, 
  108.     StaticText {"TStaticText", noAdornment, sizeable, notDimmed, notHilited, 
  109.         doesntDismiss, noInset, systemFont, justSystem, "Font"}, 
  110.  
  111.     'DLOG', 'VW29', {5, 160}, {15, 30}, sizeFixed, sizeFixed, shown, disabled, 
  112.     StaticText {"TStaticText", noAdornment, sizeable, notDimmed, notHilited, 
  113.         doesntDismiss, noInset, systemFont, justSystem, "Size"}, 
  114.         
  115.     'DLOG', 'samp', {145, 65}, {45, 390}, sizeFixed, sizeFixed, shown, disabled,
  116.     StaticText { "TSampleText", adnFrame, {1, 1}, notSizeable, notDimmed, notHilited,
  117.         doesntDismiss, {3, 3, 3, 3}, plain, 0, {0x0, 0x0, 0x0}, "A", justSystem,
  118.         "The quick brown fox jumped over the lazy dog."},
  119.  
  120.     'DLOG', 'face', {5, 210}, {130, 245}, sizeFixed, sizeFixed, shown, disabled, 
  121.     Cluster {"TFaceCluster", noAdornment, sizeable, notDimmed, notHilited, 
  122.         doesntDismiss, noInset, systemFont, ""}, 
  123.  
  124.     'face', 'styl', {0, 0}, {110, 110}, sizeFixed, sizeFixed, shown, disabled, 
  125.     Cluster {"TStyleCluster", noAdornment, sizeable, notDimmed, notHilited, 
  126.         doesntDismiss, noInset, systemFont, "Style:"}, 
  127.  
  128.     'styl', 'pln*', {15, 15}, {15, 55}, sizeFixed, sizeFixed, shown, enabled, 
  129.     ValueCheckBox {"TValueCheckBox", noAdornment, sizeable, notDimmed, notHilited, 
  130.         doesntDismiss, noInset, systemFont, on, "Plain", kEmptySet},
  131.  
  132.     'styl', 'bld0', {30, 15}, {15, 50}, sizeFixed, sizeFixed, shown, enabled, 
  133.     ValueCheckBox {"TValueCheckBox", noAdornment, sizeable, notDimmed, notHilited, 
  134.         doesntDismiss, noInset, systemFont, off, "Bold", boldBit}, 
  135.  
  136.     'styl', 'Itl1', {45, 15}, {15, 55}, sizeFixed, sizeFixed, shown, enabled, 
  137.     ValueCheckBox {"TValueCheckBox", noAdornment, sizeable, notDimmed, notHilited, 
  138.         doesntDismiss, noInset, systemFont, off, "Italic", italicBit}, 
  139.  
  140.     'styl', 'und2', {60, 15}, {15, 80}, sizeFixed, sizeFixed, shown, enabled, 
  141.     ValueCheckBox {"TValueCheckBox", noAdornment, sizeable, notDimmed, notHilited, 
  142.         doesntDismiss, noInset, systemFont, off, "Underline", underlineBit}, 
  143.  
  144.     'styl', 'out3', {75, 15}, {15, 65}, sizeFixed, sizeFixed, shown, enabled, 
  145.     ValueCheckBox {"TValueCheckBox", noAdornment, sizeable, notDimmed, notHilited, 
  146.         doesntDismiss, noInset, systemFont, off, "Outline", outlineBit}, 
  147.  
  148.     'styl', 'shd4', {90, 15}, {15, 70}, sizeFixed, sizeFixed, shown, enabled, 
  149.     ValueCheckBox {"TValueCheckBox", noAdornment, sizeable, notDimmed, notHilited, 
  150.         doesntDismiss, noInset, systemFont, off, "Shadow", shadowBit}, 
  151.  
  152.     'face', 'spac', {65, 115}, {65, 130}, sizeFixed, sizeFixed, shown, disabled, 
  153.     Cluster {"TSpaceCluster", noAdornment, sizeable, notDimmed, notHilited, 
  154.         doesntDismiss, noInset, systemFont, "Spacing:"}, 
  155.  
  156.     'spac', 'Norm', {15, 15}, {15, 75}, sizeFixed, sizeFixed, shown, enabled, 
  157.     ValueRadio {"TValueRadio", noAdornment, sizeable, notDimmed, notHilited, 
  158.         doesntDismiss, noInset, systemFont, on, "Normal", kNormalSpacing},
  159.  
  160.     'spac', 'Comp', {30, 15}, {15, 100}, sizeFixed, sizeFixed, shown, enabled, 
  161.     ValueRadio {"TValueRadio", noAdornment, sizeable, notDimmed, notHilited, 
  162.         doesntDismiss, noInset, systemFont, off, "Condensed", condenseBit}, 
  163.  
  164.     'spac', 'Expd', {45, 15}, {15, 80}, sizeFixed, sizeFixed, shown, enabled, 
  165.     ValueRadio {"TValueRadio", noAdornment, sizeable, notDimmed, notHilited, 
  166.         doesntDismiss, noInset, systemFont, off, "Extended", extendBit}
  167.     }
  168. };
  169.  
  170. resource 'STR#' (kSampleTextString,
  171. #if qNames
  172.     "kSampleTextString",
  173. #endif
  174.     purgeable) {
  175.     {
  176.     "The quick brown fox jumped over the lazy dog.";
  177.     "Pack my box with five dozen liquor jugs.";
  178.     }
  179. };  // kSampleTextString
  180.  
  181.